package com.veetao.api.resp;

import java.io.Serializable;
import java.util.List;

import com.veetao.api.annotation.Required;
import com.veetao.api.req.ExtraParams;

public class ListDataContainer<T> extends ExtraParams implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -4796403492705222862L;
	@Required(value=true, desc="当前页码")
	private int currentPageNo;
	
	@Required(value=false, desc="当前页面数据量")
	private int currentPageSize;
	

	
	@Required(value=true, desc="数据列表")
	private List<T> list;
	
	
	
//	@Required(value=false, desc="列表类信息附加字段，下次发同一类请求时（请求下一页）原样带回，用于计算分页数据")
//	private Map<String, Integer> extras;
	
	
	
	

	public ListDataContainer() {
		super();
	}


	public int getCurrentPageNo() {
		return currentPageNo;
	}

	public void setCurrentPageNo(int currentPageNo) {
		this.currentPageNo = currentPageNo;
	}

	public List<T> getList() {
		return list;
	}

	public void setList(List<T> list) {
		this.list = list;
		this.currentPageSize = list == null ? 0 : list.size();
	}


	public int getCurrentPageSize() {
		return currentPageSize;
	}

	public void setCurrentPageSize(int currentPageSize) {
		this.currentPageSize = currentPageSize;
	}


}
